<template>
  <ul>
    <li v-for="(item, index) in props.list" :key="item + index" @click="delItem(index)">{{ item }}</li>
  </ul>
</template>

<script setup>
import { ref } from 'vue';

const props = defineProps({
    list:Array,
    default:()=>[]
})

const emits = defineEmits(['handleDel'])


//删除当前
const delItem = (index)=>{
    emits('handleDel',index)
}





</script>

<style scoped>
</style>